<template>
	<view class="all">
		<view :class="index!=7?'body':'body01'" @click="submit(item)" v-for="(item,index) in list">
			<view class="body1">
				<image :src="item.src" style="width: 40rpx;height:40rpx ;" mode="" />
				<u-badge :absolute='true' is-center type="error" class="badge" :count="index+1"></u-badge>
			</view>
			<view class="body2">
				<view class="body2_5">
					<text class="u-text1">{{item.name}}</text>
					<text class="u-text56">2021-12-12 24:00:00</text>
				</view>
				<text class="u-text2">课程购买成功</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						name: '系统消息',
						src: require('./img/kc.png')
					},
					{
						name: '官方通知',
						src: require('./img/tz.png')
					},
					{
						name: '课程提示',
						src: require('./img/kcts.png')
					},

				],
			};
		},
		methods: {
			submit(a) {
				uni.navigateTo({
					url: `/pages/news/listnews?data=${a.name}`
				});
			}
		}
	}
</script>

<style lang="scss">
	.badge {
		position: absolute;
		top: 5px !important;
		right: 5px !important;
	}

	.body2_5 {
		display: flex;
		justify-content: space-between;

		.u-text56 {
			ont-size: 22rpx;
			font-family: HarmonyOS Sans;
			font-weight: 400;
			color: #91969A;
			opacity: 1;
		}
	}

	.body2 {
		width: 85%;

		text {
			display: block;
		}

		.u-text2 {
			font-size: 28rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #91969A;
			opacity: 1;
			margin-top: 8rpx;
		}

		.u-text1 {
			font-size: 32rpx;
			font-family: Source Han Sans CN;
			font-weight: bold;
			color: #131314;
			opacity: 1;
		}
	}

	.body01 {
		display: flex;
		padding: 30rpx 0 30rpx 0;
		justify-content: space-between;
	}

	.body {
		display: flex;
		border-bottom: 1px solid #E3E3E3;
		padding: 30rpx 0 30rpx 0;
		justify-content: space-between;
	}

	.all {
		padding: 20rpx;
	}

	.body1 {
		position: relative;
		display: flex;
		justify-content: center;
		align-items: center;
		text-align: center;

		background-color: rgb(19, 19, 20);
		width: 88rpx;
		border-radius: 50%;
		height: 88rpx;
		background-size: 100%;
	}
</style>
